/*
 * berton
 */
package com.pitop.market.service;

import java.util.List;
import java.util.Map;
import com.pitop.core.base.BaseSV;
import com.pitop.market.entity.MarketRepairRecordState;
import com.pitop.market.entity.MarketRepairRecord;

/**
 * 维修记录
 *
 * @author berton
 */
public interface MarketRepairRecordSV extends BaseSV<MarketRepairRecord,Long> {


    /**
     * 加载一个对象MarketRepairRecord
     * @param id @param code 编码
     * @return MarketRepairRecord
     */
     MarketRepairRecord load(java.lang.Long id,java.lang.String code);

    /**
     * 加载一个对象MarketRepairRecord 通过id
     * @param id 
     * @return MarketRepairRecord
     */
     MarketRepairRecord loadById(java.lang.Long id);
    /**
     * 加载一个对象MarketRepairRecord 通过code
     * @param code 编码
     * @return MarketRepairRecord
     */
     MarketRepairRecord loadByCode(java.lang.String code);


    /**
    * 根据主键id,oldStates 共同更新 MarketRepairRecord 的状态到newState状态
    *
    * @param id 
    * @param newState 新状态
    * @param oldStates 旧状态集合
    */
    void updateStateById(java.lang.Long id,MarketRepairRecordState newState,MarketRepairRecordState... oldStates);
    /**
    * 根据主键code,oldStates 共同更新 MarketRepairRecord 的状态到newState状态
    *
    * @param code 编码
    * @param newState 新状态
    * @param oldStates 旧状态集合
    */
    void updateStateByCode(java.lang.String code,MarketRepairRecordState newState,MarketRepairRecordState... oldStates);

    /**
    * 根据主键id 更新 MarketRepairRecord 的状态到另一个状态
    *
    * @param id 
    * @param state 状态
    */
    void updateById(java.lang.Long id,MarketRepairRecordState state);
    /**
    * 根据主键code 更新 MarketRepairRecord 的状态到另一个状态
    *
    * @param code 编码
    * @param state 状态
    */
    void updateByCode(java.lang.String code,MarketRepairRecordState state);


    /**
     * 删除对象MarketRepairRecord
     * @param id @param code 编码
     * @return MarketRepairRecord
     */
     void delete(java.lang.Long id,java.lang.String code);



    /**
     * 查询MarketRepairRecord分页
     *
     * @param marketRepairRecord  维修记录
     * @param offset 查询开始行
     * @param limit  查询行数
     * @return List<MarketRepairRecord>
     */
     List<MarketRepairRecord> list(MarketRepairRecord marketRepairRecord, int offset, int limit);
     int count(MarketRepairRecord marketRepairRecord);

     /**
     * 查询MarketRepairRecord分页
     *
     * @param id  * @param code  编码
     * @param offset 查询开始行
     * @param limit  查询行数
     * @return List<MarketRepairRecord>
     */
     List<MarketRepairRecord> list(java.lang.Long id,java.lang.String code,int offset, int limit);
     int count(java.lang.Long id,java.lang.String code);



}
